import request from '@/config/axios'

export interface DriverMgrVO {
  id: number
  driverName: string
  mobile: string
  isIdIdentified: boolean
  idNo: string
  idAddress: string
  startDate: Date
  endDate: Date
  isLicenseIdentified: boolean
  licenseNo: string
  licenseType: string
}

// 查询司机管理列表
export const getDriverMgrPage = async (params: DriverMgrPageReqVO) => {
  return await request.get({ url: `/queue/driver-mgr/page`, params })
}

// 查询司机管理详情
export const getDriverMgr = async (id: number) => {
  return await request.get({ url: `/queue/driver-mgr/get?id=` + id })
}

// 新增司机管理
export const createDriverMgr = async (data: DriverMgrVO) => {
  return await request.post({ url: `/queue/driver-mgr/create`, data })
}

// 修改司机管理
export const updateDriverMgr = async (data: DriverMgrVO) => {
  return await request.put({ url: `/queue/driver-mgr/update`, data })
}

// 删除司机管理
export const deleteDriverMgr = async (id: number) => {
  return await request.delete({ url: `/queue/driver-mgr/delete?id=` + id })
}

// 导出司机管理 Excel
export const exportDriverMgr = async (params) => {
  return await request.download({ url: `/queue/driver-mgr/export-excel`, params })
}

//获取司机绑定的车辆

export const getVehicleMgrList = async (ids) => {
  return await request.get({ url: `/queue/driver-vehicle/vehicle-list?id=${ids}` })
}
